package com.cj.DesignMode.factory;

/**
 * 工厂模式，将所有对象的创建通过Factory去创建，需要将所需的对象传入，具体创建由工厂处理。
 */
public class FactoryPatternDemo {
    public static void main(String[] args) {
        ShapeFactory shapeFactory = new ShapeFactory();
        Shape rectangle = shapeFactory.getShape("Circle");
        rectangle.draw();
    }
}
